package com.sentrix.auto.printercenter.presentation.center.dto;

import com.sentrix.auto.printercenter.common.AssertUtil;
import com.sentrix.auto.printercenter.domain.entity.PrinterEntity;
import com.sentrix.auto.printercenter.infrastructure.util.VOUtil;
import lombok.Data;

@Data
public class PrinterResDto {
    private String name;
    private String code;
    private Boolean isOnline;
    private Boolean enable;
    private String agentCode;
    private String agentName;

    public static PrinterResDto fromDomain(PrinterEntity entity) {
        AssertUtil.assertNotNull(entity, "convert null value");
        return VOUtil.modelMapper().map(entity, PrinterResDto.class);
    }
}
